import apiClient from '@/api/apiClient';

// 新增
const createNotice = (data?: any) => apiClient.post({ url: '/management/notice', data });

// 删除
const deleteNotice = (id: number) => apiClient.delete({ url: `/management/notice/${id}` });

// 修改
const updateNotice = (id?: number, data?: any) =>
  apiClient.put({ url: `/management/notice/${id}`, data });

// 获取列表
const getNoticesList = (data?: any) => apiClient.get({ url: '/management/notices', params: data });

export default {
  getNoticesList,
  createNotice,
  deleteNotice,
  updateNotice,
};
